import random
player_input = input("请输入(0 剪刀、1 石头、2 布): ")
player = int(player_input)
comper = random.randint(0, 2)
if (player == 0 and comper == 2) or (player == 1 and comper == 0) or (player == 2 and comper == 1):
    print("电脑出的是%d,恭喜你赢了！"%comper)
elif (player == 0 and comper == 0) or (player == 1 and comper == 1) or (player == 2 and comper == 2):
    print("电脑出的是%d，平局。" %comper)
else:
    print("电脑出的是%d，你输了，再接再厉！" %comper)